Skip to content

feat(client): surface Discover Weekly on Explore (web + native) - #14574

Merged
dylanjeffers merged 5 commits into
mainfrom
feat/discover-weekly-client
Aug 24, 2026
Merged

feat(client): surface Discover Weekly on Explore (web + native)#14574
dylanjeffers merged 5 commits into
mainfrom
feat/discover-weekly-client

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Wires GET /users/:id/discover-weekly into the Explore page on web and native, rendered as a collection card so the mix reads like a playlist.

Depends on api#1025 and api#1026 — both merged and live in production.

What's here

  • useDiscoverWeekly — a plain useQuery, not infinite. The mix is a fixed-size artifact, not a lineup you scroll; there is no page 2.
  • sdk.users.getDiscoverWeekly — hand-written pending the next SDK regen, same as getSuggestedFollows in feat(client): personalize empty-feed follow suggestions #14562, since npm run gen pulls the spec from a running node.
  • Web section (desktop + mobile web) and a parallel native section, since packages/mobile composes its own Explore screen.

Three decisions worth reviewing

The artwork is a checked-in asset. The mix has no playlist_id to hang cover art on — Audius playlists are on-chain entities and the mix is computed per request. Styled to sit alongside the Hot & New playlist art.

Clicking plays instead of navigating. No permalink to navigate to, so the card queues all 30 starting at the top. Closest thing to playlist behavior without a route.

No section heading or Carousel. One card, so the scroll affordance is dead weight and a heading would repeat the card's own title.

Known gaps

  • The card has playlist affordances without playlist substance — can't be favorited, reposted, shared, or linked to. Closing that needs the stored track-list per (user, year, week), which would also fix the mid-week drift noted in api#1025.
  • Not visually verified in the running app at time of opening — the section is signed-in-only.

Verification

tsc and eslint clean across web, mobile, and sdk. The one common error (getDiscoverWeekly not on UsersApi) is the known SDK-dist parity issue — the built dist/index.d.ts types sdk.users as the generated class, so the already-merged useSuggestedFollows produces an identical error. Resolves on the next regen.

🤖 Generated with Claude Code

dylanjeffers and others added 2 commits August 24, 2026 13:29
Wires GET /users/:id/discover-weekly into the Explore page as a
collection card, so the mix reads like a playlist even though it isn't
one.

sdk.users.getDiscoverWeekly is hand-written pending the next SDK regen,
same as getSuggestedFollows in #14562, since npm run gen pulls the spec
from a running node.

The artwork is a checked-in asset rather than entity cover art: the mix
has no playlist_id to hang an image on. Same reason there's no permalink
-- clicking plays the mix in place (all 30 queued, starting at the top)
rather than navigating.

Rendered without a Carousel wrapper: there's exactly one card, so the
scroll affordance is dead weight and a section heading would repeat the
card's own title.

Web only for now -- the native mobile app has a separate Explore screen.

Depends on AudiusProject/api#1025 (merged).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors the web section. The native app composes its own Explore screen
from a separate component set, so this is a parallel implementation
rather than a shared one.

Same shape as web: bundled artwork asset (the mix has no playlist_id to
hang cover art on), press plays the mix in place with all 30 queued
rather than navigating, and no ExploreSection wrapper since a heading
would repeat the card's own title.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ed01871

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Promotes Discover Weekly from a card in the Explore stack to a proper
feature with its own destination.

- Dedicated page at /explore/discover-weekly (web) and a matching native
  screen. Structured like a collection page -- artwork, title, play-all,
  full track list -- but assembled from the History page's pieces, since
  there's no collection entity to drive the real collection page.
- Full-width banner pinned to the top of Explore on both platforms,
  replacing the card. This is a launch placement for a new feature, not
  another content row, so it sits above the section stack.
- The same banner on the feed. Explore was the only entry point and it
  takes a deliberate detour to reach; the feed is where people land.
- Analytics: banner view, banner click, page view, play-all. Every event
  carries `surface` ('explore' | 'feed') so we can tell which entry point
  actually drives listens, and `trackCount` so an impression on an empty
  mix is distinguishable. Impressions fire once, and only after the mix
  resolves, so a banner that then hides itself can't inflate the
  click-through denominator.

The banner navigates rather than playing in place -- it's an entry point,
and the page it opens has the play-all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a play-all button to the native Discover Weekly screen, mirroring the
web page: toggle when already on the first track, otherwise start the
queue from the top. Web had one and native didn't.

Also bounds the useDiscoverWeekly staleTime. It was Infinity with
refetchOnMount: false, which meant a single failed or empty first fetch
was permanent for the session -- nothing retried it, and the surfaces
that hide themselves on an empty result stayed hidden until restart. The
server already caches the mix for hours, so the infinite client staleTime
bought nothing and only removed the recovery path.

Verified: typecheck and lint clean; web play-all confirmed in the browser
(starts playback, queues all 30). The native play-all is NOT verified on
device -- the simulator has a Release-scheme build, which per
AppDelegate.mm resolves its bundle through CodePush rather than Metro, so
it kept executing a stale bundle. Verifying it needs a Dev-scheme build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dylanjeffers

Copy link
Copy Markdown
Contributor Author

Verification status at merge

Verified in a running app:

  • Web: banner on Explore and feed, navigation to /explore/discover-weekly, page renders as a playlist, Play starts the mix and queues all 30 tracks.
  • Native (iOS simulator): banner on Explore and feed, navigation to the screen, screen renders with 30 real tracks, individual track playback works.

Not verified:

  • The native play-all button. The simulator has a Release-scheme build installed, and per AppDelegate.mm:72-79 bundleURL only points at Metro under #if DEBUG — otherwise it resolves through CodePush. The app kept executing a stale bundle regardless of Metro serving fresh code (confirmed with a liveness probe). Verifying it needs a Dev-scheme build (npm run ios:dev).

Also in the last commit

useDiscoverWeekly had staleTime: Infinity + refetchOnMount: false. A single failed or empty first fetch was permanent for the session — no retry, and the surfaces that hide on an empty result stayed hidden until app restart. Now bounded to 30 minutes; the server already caches the mix for hours.

Known gaps carried forward

  • Mid-week drift (API): the played-exclusion has no upper time bound, so the mix can shrink as a listener plays through it once the server cache expires. Fixing it properly needs a stored track list per (user, year, week) — which would also give the mix a real URL and let it be favorited/shared. Tracked from feat(api): add Discover Weekly mix endpoint api#1025.
  • The artwork uses a procedurally-roughened Avenir Next Condensed, not the brush face used on Hot & New / All Things Bass / Windows Down. That font is not in the repo and is not named anywhere in writing — Julian has it, and has previously flagged it as poorly constructed for web use.

Web Tests failed on responsiveCoverage.test.ts: the Discover Weekly page
uses TrackTableLineup but had no entry in RESPONSIVE_TABLE_POLICIES, and
that test governs the invariant that every shared-table consumer declares
one. Adds a discoverWeeklyTracks policy, registers the page in the
audited consumer list, and actually passes the policy to the table --
without that last part the entry would have satisfied the test while the
table stayed non-responsive.

Merge conflict in AppTabScreen.tsx was purely indentation: #14575
re-indented the Stack.Screen block. Took main's formatting and re-added
the DiscoverWeeklyScreen registration at the matching depth.

Full web suite passes locally (152 passed, 9 skipped).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dylanjeffers
dylanjeffers merged commit b097c8f into main Aug 24, 2026
23 checks passed
@dylanjeffers
dylanjeffers deleted the feat/discover-weekly-client branch August 24, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant